﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WinFormsAppTest.Dao;

namespace WinFormsAppTest.Service
{
    internal class FilesService
    {

        public List<WinFormsAppTest.Class.Files> GetFiles()
        {
            FilesDao filesdao = new FilesDao();
            List<WinFormsAppTest.Class.Files> files = filesdao.GetFiles();
            return files; 
        }

        //根据用户id进行搜索
        public List<WinFormsAppTest.Class.Files> GetFilesByUserId(int id)
        {
            FilesDao filesdao = new FilesDao();
            List<WinFormsAppTest.Class.Files> files = filesdao.GetFilesByUserId(id);
            return files;
        }

        //根据档案id进行搜索
        public List<WinFormsAppTest.Class.Files> GetFilesById(int id)
        {
            FilesDao filesdao = new FilesDao();
            List<WinFormsAppTest.Class.Files> files = filesdao.GetFilesById(id);
            return files;
        }

        public List<WinFormsAppTest.Class.Files> GetFilesByHouse(string house)
        {
            FilesDao filesdao = new FilesDao();
            List<WinFormsAppTest.Class.Files> files = filesdao.GetFilesByHouse(house);
            return files;
        }
    }
}
